package cn.pomelo.kdsearch.controller;

import cn.pomelo.kdsearch.service.IKdSearchService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@CrossOrigin("*")
public class KdSearchController {

    @Resource
    IKdSearchService iKdSearchService;

    @GetMapping("/search")
    public String search(String code) throws Exception {
        return iKdSearchService.search(code);
    }

}
